package com.crpc.core.serialize;

/**
 * @author wzy
 * @version 1.0
 * @description: 序列化器
 * @date 2023/9/29 15:12
 */
public interface Serializer {
    /**
     * @description: 序列化
     * @author wzy
     * @date 2023/9/29 15:14
     */
    byte[] serialize(Object object);

    /**
     * @description: 反序列化
     * @author wzy
     * @date 2023/9/29 15:14
     */
    <T> T deserialize(byte[] bytes, Class<T> clazz);
}
